package com.lu.adog.demo.main.page.image.adapter;

import android.content.Context;
import android.view.View;

import com.lu.adog.R;
import com.lu.adog.demo.common.CommonTask;
import com.lu.adog.demo.common.adapter.CommonAdapter;
import com.lu.adog.demo.main.page.image.dogitem.PSBWColorActivity;
import com.lu.adog.demo.main.data.model.ItemModel;

import java.util.List;

/**
 * @author Yue
 * @date 2017/11/16 16:50
 */

public class HandlerImageAdapter extends CommonAdapter {
    public HandlerImageAdapter(Context context) {
        super(context);
    }

    @Override
    protected void initItemModeArray(Context context, List<ItemModel> itemModelList) {
        int[] names = {R.string.ps_black_white_name};
        int[] des = {R.string.ps_black_white_des};
        new CommonTask().genItemModelList(itemModelList, names, des);
    }

    @Override
    protected void onItemModelClick(View view, int position, int itemNameStrId) {
        switch (itemNameStrId) {
            case R.string.ps_black_white_name:
                visitActivity(PSBWColorActivity.class,R.string.ps_black_white_name);
                break;
            default:
                break;
        }
    }
}
